Re: [GENERAL] char(xx) problem - Mailing list pgsql-general

From Herouth Maoz
Subject Re: [GENERAL] char(xx) problem
Date
Msg-id l03130301b4851b846903@[147.233.159.109]
Whole thread Raw
In response to Re: [GENERAL] char(xx) problem  ("Gene Selkov, Jr." <selkovjr@mcs.anl.gov>)
Responses Re: [GENERAL] char(xx) problem  (Gene Selkov <selkovjr@mcs.anl.gov>)
List pgsql-general
At 4:02 +0200 on 17/12/1999, Gene Selkov, Jr. wrote:


> I'm just wondering: are there any alternatives to blank padding? Why
> is it done in the first place?

That's how fixed-length char type works, since the early days of SQL. You
come to expect it, which means that if you use legacy code that has a
fixed-width char type, or you decided to use it for its time-saving
possibilities, it should behave according to some way which has been
established long ago.

What I don't get is why, given two bpchar argument, Postgres doesn't just
pad the shorter one to the length of the other and then compares, selects
and whatnot.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herouth/personal/



pgsql-general by date:

Previous
From: postgres@taifun.interface-business.de
Date:
Subject: RE: [GENERAL] Announce: Postgres Access Control Tool
Next
From: Karl DeBisschop
Date:
Subject: Cannot index large table in 6.5.3 on Linux